import 'package:xindong/common/xindong_common_vm.dart';
import 'package:xindong/routes/tab_moments/controller/xindong_dongtai_handle.dart';
import 'package:xindong/routes/tab_moments/model/xindong_dongtai_class.dart';

class XinDongDongTaiDetailsController extends XinDongCommonVM {
  final _handle = XinDongDongTaiHandle();
  late XinDongDongTaiClass model;

  // 评论临时文本，评论成功后清除
  String? tempCommentText;

  XinDongDongTaiDetailsController(this.model, {super.initialRefresh = false}) {
    requestLoadData();
  }

  // 请求加载列表
  requestLoadData() async {
    final result = await _handle.requestDetails(model.dy_id);
    if (result != null) {
      model = result;
      update();
    }
  }
}
